exports = {
  data: {
    title: '用户详情',
    headTip: "用户详情 ,,,, ,,,,",
    info: {}
  }
  ,use:["rb","jquery"]
  ,init: function(rb,$) {
    var that = this;
    var id = that.data.id;
    // 模板解析前的运行代码
    rb.log("index init");
    if( that.data.headTip ) {
      that.data.headTip = rb.getHtmlHeadTip( that.data.headTip );
    }
    // 查询id的数据 写入到 that.data
    var url = layui.cache.apiPath  + 'api_user/detail';
    $.getJSON(url,{id:id},function(data) {
      console.log("that",that);
      console.log(url , data);
      if(data.code){
        rb.alert(data.msg);
      }else{
        that.data.info = data.data;
      }
    })
  }
  ,after: function(rb,$) {
  }
}